<!-- <template>
  <div id="app">
    <router-view v-if="isRouterAlive"></router-view>
  </div>
</template>
<script>
  export default {
    name: 'app',
    provide() {
      return {
        reload: this.reload
      }
    },
    data() {
      return {
        isRouterAlive: true
      }
    },
    methods: {
      reload() {
        this.isRouterAlive = false
        this.$nextTick(function () {
          this.isRouterAlive = true;
        })
      }

    }
  }

</script>

 -->
 <script>
   export default {
    onLaunch: function() {
        uni.getSystemInfo({  
            success:function(e){  
                Vue.prototype.statusBar = e.statusBarHeight  
                // #ifndef MP  
                if(e.platform == 'android') {  
                    Vue.prototype.customBar = e.statusBarHeight + 50  
                }else {  
                    Vue.prototype.customBar = e.statusBarHeight + 45  
                }  
                // #endif  
    
                // #ifdef MP-WEIXIN  
                let custom = wx.getMenuButtonBoundingClientRect()  
                Vue.prototype.customBar = custom.bottom + custom.top - e.statusBarHeight  
                // #endif  
    
                // #ifdef MP-ALIPAY  
                Vue.prototype.customBar = e.statusBarHeight + e.titleBarHeight  
                // #endif  
            }  
        })  
    }
   }
 </script>
